<?php

$id = getInput("id",0);
$userManager = new User();
$userManager->delete($id);
if (!isAdminLoggedIn()){
	logout();
}
logSuccess(langEcho("user:delete:success"));

$redirect = $_SERVER["HTTP_REFERER"];
if (contains($redirect, WWWROOT. "admin")){
	forward(WWWROOT . "admin/users.php");
}else{
	forward(WWWROOT);
}

?>